
/**
 * Handle changed data.
 *
 * @param {Number} oldValue old value
 * @param {Number} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"CC2A5ECC-8CE5-44A5-B7E3-E4BC0B29167D"}
 */
function onDataChangeMoneda(oldValue, newValue, event) {

	if (newValue == 2)
	{
		//MUESTRO DOLARES
		var $dolar = true
	}
	else
	{
		//MUESTRO NACIONAL
		var $dolar = false
	}
	
	for (var i = 1 ; i <= elements.tab_resultados.getMaxTabIndex() ; i++)
	{
		var $idx = elements.tab_resultados.getTabFormNameAt(i)
		forms[$idx].elements.fld_precio.visible 	= !$dolar
		forms[$idx].elements.fld_precio_dls.visible = $dolar
	}
	return true
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} [firstShow] form is shown first time after load
 * @param {JSEvent} [event] the event that triggered the action
 *
 * @properties={typeid:24,uuid:"4FD5EA5B-1BD7-4E19-83BD-5380C647BF57"}
 */
function onShow(firstShow, event) {
	//dibujarServicios()
	var $cat = 1
	while ($cat <= 5)
	{
		if (ghotel_to_hoteles.categoria_id >= $cat)
		{
			elements['img_estrella_'+$cat].visible = true
		}
		else
		{
			elements['img_estrella_'+$cat].visible = false
		}
		$cat++
	}
}

/**
 * Callback method when the user changes tab in a tab panel or divider position in split pane.
 *
 * @param {Number} previousIndex index of tab shown before the change
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"09B0B4FF-D1D6-4EE5-B8CE-1205CBA24199"}
 */
function onTabChange(previousIndex, event) {
	globals.gCantPasajeros 	= forms[elements.tab_resultados.getTabFormNameAt(elements.tab_resultados.tabIndex)].fPasajeros
	globals.gCantMenores 	= forms[elements.tab_resultados.getTabFormNameAt(elements.tab_resultados.tabIndex)].fMenores
}
